package com.jic.member.controller.power;

import com.jic.common.base.vo.RestResult;
import com.jic.member.api.rest.JsApi;
import com.jic.member.service.JsApiService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/jsApi")
@Api(value = "APi-用户基础接口", tags = "APi-用户基础接口")
public class JsApiController implements JsApi {
    @Autowired
    private JsApiService jsApiService;

    /**
     * 获取调用weixin api的token
     *
     * @return
     * @throws Exception
     */
    @Override
    public RestResult<String> getWeiXinApiToken() throws Exception {
        return RestResult.success(jsApiService.getWeiXinApiToken());
    }
}
